package stack;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 苏李涛
 * Date: 2024-07-14
 * Time: 23:21
 */
public class StackTest {
    public static void main(String[] args) {
        MyStack myStack = new MyStack();
        myStack.push(1);
        myStack.push(2);
        myStack.push(3);
        myStack.push(4);

        //出栈->先入后出
        /*System.out.println(myStack.pop());
        System.out.println(myStack.pop());
        System.out.println(myStack.pop());
        System.out.println(myStack.pop());*/

        int[] array1 = new int[]{1,2,3,4,5};
        int[] array2 = new int[]{4,5,3,2,1};


        System.out.println(myStack.IsPopOrder(array1, array2));
    }
}
